package com.allwees.bs.c.module.order.dto;

import com.allwees.bs.c.module.order.entity.OrderSkuSnapEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel(description = "商品SKU快照")
public class SkuSnapDTO implements Serializable {
//    @ApiModelProperty(value = "SKU ID")
    private String uuid;

//    @ApiModelProperty(value = "SKU No")
    private String no;

//    @ApiModelProperty(value = "颜色")
    private String color;

//    @ApiModelProperty(value = "尺寸")
    private String size;

//    @ApiModelProperty(value = "图片地址")
    private String[] photos;

//    @ApiModelProperty(value = "商品原价")
    private BigDecimal originalPrice;

//    @ApiModelProperty(value = "商品零售价")
    private BigDecimal retailPrice;

//    @ApiModelProperty(value = "商品价格币种")
    private String currency;

//    @ApiModelProperty(value = "商品库存量")
    private Integer quantity;

    public SkuSnapDTO(OrderSkuSnapEntity skuSnap) {
        this.setUuid(skuSnap.getSkuUuid());
        this.setNo(skuSnap.getSkuNo());
        this.setColor(skuSnap.getSkuColor());
        this.setSize(skuSnap.getSkuSize());
        this.setPhotos(skuSnap.getPhotos());
        this.setOriginalPrice(skuSnap.getSkuOriginPrice());
        this.setRetailPrice(skuSnap.getSkuRetailPrice());
        this.setCurrency(skuSnap.getCurrency());
        this.setQuantity(skuSnap.getQuantity());
    }
}
